Skip to content

Fix error counter in heat pump safety control#2015

Merged
mwetter merged 6 commits intomasterfrom
2011_minFlowRateCounter
May 27, 2025
Merged

Fix error counter in heat pump safety control#2015
mwetter merged 6 commits intomasterfrom
2011_minFlowRateCounter

Conversation

@FWuellhorst
Copy link
Copy Markdown
Contributor

Closes #2011 .

@mwetter: The issue is valid for the other blocks, as well. Thus, I added the fix to the partial safety controller with error counter class.

I checked the examples and the counts look fine to me.
Only in the aggregated example, there sometimes is an increase in err for two components, e.g. opeEnvErr and minFlowErr, see picture below.
image
The event log shows two time events close to each other, see analysis:
image

I do think the new hys blocks could lead to more state events in a closed loop simulation, or do you think it makes no difference?
If it leads to more events, should I add a general countErrors Boolean to the safety blocks?

@mwetter
Copy link
Copy Markdown
Contributor

mwetter commented May 26, 2025

@FWuellhorst : I don't think the two events close to each other will pose an issue. I suggest we keep the counter always present as it is now.
I also cleaned up the model to remove two instance of ySetOn which were equal and removed the size of the boundary check blocks as they were overlapping with a not block underneath.
From my point of view this is ready to be merged.

A future improvement could be to put yOn after the on off safety control on the bus, and then use this in the downstream blocks to avoid the multiple instances of ySetOn.

@FWuellhorst
Copy link
Copy Markdown
Contributor Author

Thanks for the adjustments. I further added revisions.

Regarding yOn, this will not work with the current serial control logic, where one output affects the others. While series connection is required for the onOff checks, the other three blocks could be put in parallel, if I am not mistaken. Still, one global yOn would not work.

@mwetter
Copy link
Copy Markdown
Contributor

mwetter commented May 26, 2025

The idea is to put the downstream safety blocks in parallel, and they all get the on signal as computed after the first block, or its bypass if the block is conditionally removed.

FWuellhorst added a commit that referenced this pull request May 27, 2025
@mwetter mwetter merged commit 649c777 into master May 27, 2025
3 checks passed
@mwetter mwetter deleted the 2011_minFlowRateCounter branch May 27, 2025 17:23
mwetter added a commit that referenced this pull request Jul 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong test if heat pump safety control for minimum flow rate

2 participants